package cn.wancat.pattern.behavioral.strategy;

public class Test {
    public static void main(String[] args) {

        Context context = new Context();
        Strategy strategy = new ConcreteStrategy1();
        context.setStrategy(strategy);
        context.strategyMethod();
        System.out.println(">>>>>>>>>>>>>");
        Strategy strategy2 = new ConcreteStrategy2();
        context.setStrategy(strategy2);
        context.strategyMethod();
        context.strategyMethod();
    }
}
